<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>编辑规则</title>
    <link href='Public/hdjs/hdjs.css' rel='stylesheet' media='screen'>
    <script type='text/javascript' src='Public/Admin/js/jquery-1.8.2.min.js'></script>
    <script type='text/javascript' src='Public/hdjs/hdjs.min.js'></script>
    <script type='text/javascript' src='Public/hdjs/lhgcalendar.min.js'></script>
    <link rel="stylesheet" type="text/css" href="Public/Admin/css/mod.base.css"/>
    <script src="Public/Admin/js/mod.base.js" type="text/javascript" charset="utf-8"></script>
    <script src="Public/Admin/js/mod.rule.js" type="text/javascript" charset="utf-8"></script>
</head>
<body>
    <form action="" method="post" class="hd-form" name="form" >
        <div class="hd-menu-list">
            <ul>
                <li >
                    <a href="<?php echo U('AuthRule/index')?>">规则列表</a>
                </li>
                <li class="active">
                    <a href="javascript:;">编辑规则</a>
                </li>
            </ul>
        </div>

        <div class="hd-title-header">编辑规则</div>
        <div class="right_content">
            <table class="hd-table hd-table-form">
                <tbody>
                	  <tr>
                        <th class="hd-w100">
                            规则名称
                            <span class="star">*</span>
                        </th>
                        <td>
                            <input type="text" name="name" class="hd-w200" value="<?php echo $data['name']?>"></td>
                    </tr>
                    <tr>
                        <th class="hd-w100">
                            规则描述
                            <span class="star">*</span>
                        </th>
                        <td>
                            <input type="text" name="title" class="hd-w200" value="<?php echo $data['title']?>"></td>
                    </tr>
                    <tr>
                        <th class="hd-w100">
                            顶级规则
                            <span class="star">*</span>
                        </th>
                        <td>
                        <select name="pid">
                        	<option value="0">顶级</option>
							<?php foreach ($tree as $v){?>
								<option value="<?php echo $v['id']?>" <?php if($v['id']==$data['pid']){?>
                 selected='selected'
               <?php }?> <?php if($v['level']==3){?>
                 disabled='disabled'
               <?php }?>><?php echo $v['_name']?></option>
							<?php }?>
                        </select>
                         </td>
                    </tr>
                    <tr>
                        <th class="hd-w100">
                            状态
                            <span class="star">*</span>
                        </th>
                        <td>
                        	<label>
                        	<input type="radio" name="status" value="1" <?php if($data['status']==1){?>
                 checked="checked" 
               <?php }?> > 启用
                        	</label>
                        	<label>
                        	<input type="radio" name="status" value="0" <?php if($data['status']==0){?>
                 checked="checked" 
               <?php }?>> 禁用
                        	</label>
                         </td>
                    </tr>

					<tr>
                        <th class="hd-w100">
                            排序
                            <span class="star">*</span>
                        </th>
                        <td>
                            <input type="text" name="sort" class="hd-w200" value="<?php echo $data['sort']?>"></td>
                    </tr>

                </tbody>
            </table>
        </div>
        <input type="hidden" name="id" value="<?php echo $data['id']?>" />
        <input type="submit" value="编辑" class="hd-btn hd-btn-sm">
        <input type="button" value="返回" class="hd-btn hd-btn-sm" onclick="location.href='<?php echo U('AuthRule/index')?>'">
        </form>
</body>
</html>